﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MaxStudio.Concrete.DBUtility
{
    public static class ConcreteConstants
    {
        //System
        public readonly static String CURRENT_USER = "current_user";

        public readonly static String CURRENT_PLANT = "current_plant";

        public readonly static String USER_FUNCTIONURL = "user_functionurl";
        
        public readonly static String USER_FUNCTION = "user_function";

        public readonly static String USER_DATACONTEXT = "user_datacontext";

        public readonly static String CURRENT_LANGUAGE = "current_language";

        public readonly static String LAST_ERROR = "Last_Error";

        public readonly static String LANG_ENUS = "en-US";

        public readonly static String LANG_ZHCN = "zh-CN";

        public readonly static String TIME_DIFF = "timediff";

        public readonly static String OPTION_ALL = "-1";

        public readonly static short ROLE_SESSIONTIME = 30;

        //plantSetting
        public readonly static String GROUP_PRODUCTIVITY = "Productivity";

        public readonly static String KEY_LABOR_UNIT_COST = "Labor_Unit_Cost";

        public readonly static String GROUP_ADMINISTRATIONO = "Administration";

        public readonly static String KEY_APPLY_USER_NOTIFICATION = "Apply_User_notification";

        public readonly static String DATATYPE_INT = "INT";

        public readonly static String DATATYPE_STRING = "STRING";

        public readonly static String DATATYPE_DECIMAL = "DECIMAL";

        public readonly static String DATATYPE_DATETIME = "DATETIME";

        public readonly static String DATATYPE_DECIMALPOINTTWO = "DECIMAL(2)";

        //UserProfile
        public readonly static bool USER_ENABLED = true;

        public readonly static bool USER_DISABLED = false;

        //plant

        public readonly static int DEFAULT_PLANT_ID = 1;

        public readonly static String DATA_FORMAT = "";

        //plant setting
        public readonly static string PlantSetting_Group_Package = "Package";
        public readonly static string PlantSetting_Key_Innerbag_Printing_Parameter = "Innerbag_Printing_Parameter";
        public readonly static string PlantSetting_Key_Innerbag_Sterilization_Parameter = "Innerbag_Sterilization_Parameter";
        public readonly static string PlantSetting_Key_Overpouch_Sealing_Parameter = "Overpouch_Sealing_Parameter";
    //Add by Scott for AVIVA (Start)
        public readonly static string PlantSetting_Key_SAPA_Parameter = "SAPA_Parameter";
        //Add by Scott for AVIVA (End)
        //operationLog

        public readonly static String MODULE_ADMINISTRATION = "Administration";

        public readonly static String MODULE_CALIBRATION = "Calibration";

        public readonly static String MODULE_FINISHGOODS = "Finish Goods";

        public readonly static String MODULE_MASTERDATA = "Master Data";

        public readonly static String MODULE_REPORT = "Report";

        public readonly static String MODULE_STABILITYSTUDY = "Stability Study";

        public readonly static String MODULE_VC = "VC";

        //limit string 

        public readonly static String LIMIT_NOLIMIT = "None";

        public readonly static String LIMIT_NOUPPERORLOWER = "N/A";

        //SSType 
        public readonly static String SS_LongTerm_DurationText = "months";
        public readonly static String SSType_LongTerm = "Long Term";
        public readonly static String SSType_HighTemp = "High Temperature";
        public readonly static String SSType_Illumination = "Illumination";

        //Cal Alert Limit 
        public readonly static String CURRENT_CALCTask = "current_calcTask";

        //CURRENT_SCHEDULER(定时发邮件程序)
        public readonly static String CURRENT_SCHEDULER = "current_scheduler";

        //Page Transfer
        public readonly static String PageTransferContextItem = "PageTransferContextItem";

        //Session
        public readonly static String Session_ExpireTime = "Session_ExpireTime";
        public readonly static String Session_ExpireMinutes = "Session_ExpireMinutes";


        //AVIVABagComponent
        public readonly static bool AVIVABAGCOMPONENT_ENABLED = true;

        public readonly static bool AVIVABAGCOMPONENT_DISABLED = false;
        #region app settings
        public static int PageSize
        {
            get
            {
                return int.Parse(System.Configuration.ConfigurationManager.AppSettings["PageSize"]);
            }
        }

        public static string ExcelFileDirectory
        {
            get
            {
                string directory = System.Configuration.ConfigurationManager.AppSettings["ExcelFileDirectory"];
                if (!directory.EndsWith("\\"))
                {
                    directory += "\\";
                }
                return directory;
            }
        }

        public static string ReportServerUrl
        {
            get
            {
                return System.Configuration.ConfigurationManager.AppSettings["ReportServerUrl"];
            }
        }

        public static string ReportDirectory
        {
            get
            {
                return System.Configuration.ConfigurationManager.AppSettings["ReportDirectory"];
            }
        }

        public static string ReportServerDomain
        {
            get
            {
                return System.Configuration.ConfigurationManager.AppSettings["ReportServerDomain"];
            }
        }

        public static string ReportServerUserName
        {
            get
            {
                return System.Configuration.ConfigurationManager.AppSettings["ReportServerUserName"];
            }
        }

        public static string ReportServerPassword
        {
            get
            {
                return System.Configuration.ConfigurationManager.AppSettings["ReportServerPassword"];
            }
        }

        public static int CalibrationIntervalDaysOfExpireDate
        {
            get
            {
                return int.Parse(System.Configuration.ConfigurationManager.AppSettings["CalibrationIntervalDaysOfExpireDate"]);
            }
        }
        #endregion
    }
}
